<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
    /**BOM编程 属于浏览器的窗口通过window进行调用相对应的API 也可以省略掉*/
    console.log(window.location)
    // console.log(window.close())//关闭当前窗口
    // 定时器
    var timeout = setTimeout(fn1, 3000);
    function fn1() {
        console.log('定时器执行了')
    }
    clearTimeout(timeout)
    //延时器
    var interval = setInterval(fn2, 3000);
    function fn2() {
        console.log('延时器执行了')
    }
    clearInterval(interval)

</script>
</html>